﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using ImportEnt;

namespace WebImport
{
    class DiaryService
    {
        /// <summary>
        /// 数据是否存在
        /// </summary>
        /// <param name="p"></param>
        /// <returns></returns>
        internal bool CheckTitleIsExists(string p)
        {
            return false;
        }

        internal int InsertDiary(Diarys data)
        {
            string strContent = ">>" + data.DiaryTitle + " Con:" + data.DiaryContent;


            string path = AppDomain.CurrentDomain.BaseDirectory + "/" + "a.txt";
            StreamWriter writer = new StreamWriter(path, true, Encoding.UTF8);
            writer.WriteLine(strContent);
            writer.Close();

            return 1;
        }
    }
}
